package com.cx.text;

import com.cx.config.SpringConfig;
import com.cx.controller.ControllerImpl;
import com.cx.entity.Dept;
import com.cx.service.DeptService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = SpringConfig.class)
public class TextDept {
    @Autowired
    private ControllerImpl controller;

    @Test
    public void t1() {
        List<Dept> depts = controller.selectAllDept();
        System.out.println("depts = " + depts);
    }

}
